3.1264 \(\int \frac{\cot ^6(c+d x)}{(a+b \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=424 \[ -\frac{2 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{a^7 d}-\frac{\left (-135 a^2 b^2+38 a^4+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{b \left (-40 a^2 b^2+15 a^4+24 b^4\right ) \tanh ^{-1}(\cos (c+d x))}{4 a^7 d}-\frac{\left (-82 a^2 b^2+15 a^4+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}+\frac{\left (-17 a^2 b^2+4 a^4+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}+\frac{\left (-12 a^2 b^2+2 a^4+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))} \]

[Out]

(-2*(a^2 - 6*b^2)*(a^2 - b^2)^(3/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^7*d) + (b*(15*a^4 - 4
0*a^2*b^2 + 24*b^4)*ArcTanh[Cos[c + d*x]])/(4*a^7*d) - ((38*a^4 - 135*a^2*b^2 + 90*b^4)*Cot[c + d*x])/(15*a^6*
d) + ((4*a^4 - 17*a^2*b^2 + 12*b^4)*Cot[c + d*x]*Csc[c + d*x])/(4*a^5*b*d) - ((15*a^4 - 82*a^2*b^2 + 60*b^4)*C
ot[c + d*x]*Csc[c + d*x]^2)/(30*a^4*b^2*d) - (Cot[c + d*x]*Csc[c + d*x])/(2*b*d*(a + b*Sin[c + d*x])) + (a*Cot
[c + d*x]*Csc[c + d*x]^2)/(6*b^2*d*(a + b*Sin[c + d*x])) + ((2*a^4 - 12*a^2*b^2 + 9*b^4)*Cot[c + d*x]*Csc[c +
d*x]^2)/(6*a^3*b^2*d*(a + b*Sin[c + d*x])) + (3*b*Cot[c + d*x]*Csc[c + d*x]^3)/(10*a^2*d*(a + b*Sin[c + d*x]))
 - (Cot[c + d*x]*Csc[c + d*x]^4)/(5*a*d*(a + b*Sin[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 1.52088, antiderivative size = 424, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2726, 3055, 3001, 3770, 2660, 618, 204} \[ -\frac{2 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{a^7 d}-\frac{\left (-135 a^2 b^2+38 a^4+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{b \left (-40 a^2 b^2+15 a^4+24 b^4\right ) \tanh ^{-1}(\cos (c+d x))}{4 a^7 d}-\frac{\left (-82 a^2 b^2+15 a^4+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}+\frac{\left (-17 a^2 b^2+4 a^4+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}+\frac{\left (-12 a^2 b^2+2 a^4+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^6/(a + b*Sin[c + d*x])^2,x]

[Out]

(-2*(a^2 - 6*b^2)*(a^2 - b^2)^(3/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^7*d) + (b*(15*a^4 - 4
0*a^2*b^2 + 24*b^4)*ArcTanh[Cos[c + d*x]])/(4*a^7*d) - ((38*a^4 - 135*a^2*b^2 + 90*b^4)*Cot[c + d*x])/(15*a^6*
d) + ((4*a^4 - 17*a^2*b^2 + 12*b^4)*Cot[c + d*x]*Csc[c + d*x])/(4*a^5*b*d) - ((15*a^4 - 82*a^2*b^2 + 60*b^4)*C
ot[c + d*x]*Csc[c + d*x]^2)/(30*a^4*b^2*d) - (Cot[c + d*x]*Csc[c + d*x])/(2*b*d*(a + b*Sin[c + d*x])) + (a*Cot
[c + d*x]*Csc[c + d*x]^2)/(6*b^2*d*(a + b*Sin[c + d*x])) + ((2*a^4 - 12*a^2*b^2 + 9*b^4)*Cot[c + d*x]*Csc[c +
d*x]^2)/(6*a^3*b^2*d*(a + b*Sin[c + d*x])) + (3*b*Cot[c + d*x]*Csc[c + d*x]^3)/(10*a^2*d*(a + b*Sin[c + d*x]))
 - (Cot[c + d*x]*Csc[c + d*x]^4)/(5*a*d*(a + b*Sin[c + d*x]))

Rule 2726

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)/tan[(e_.) + (f_.)*(x_)]^6, x_Symbol] :> -Simp[(Cos[e + f*x]*(a
 + b*Sin[e + f*x])^(m + 1))/(5*a*f*Sin[e + f*x]^5), x] + (Dist[1/(20*a^2*b^2*m*(m - 1)), Int[((a + b*Sin[e + f
*x])^m*Simp[60*a^4 - 44*a^2*b^2*(m - 1)*m + b^4*m*(m - 1)*(m - 3)*(m - 4) + a*b*m*(20*a^2 - b^2*m*(m - 1))*Sin
[e + f*x] - (40*a^4 + b^4*m*(m - 1)*(m - 2)*(m - 4) - 20*a^2*b^2*(m - 1)*(2*m + 1))*Sin[e + f*x]^2, x])/Sin[e
+ f*x]^4, x], x] + Simp[(Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*m*Sin[e + f*x]^2), x] + Simp[(a*Cos[e
 + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b^2*f*m*(m - 1)*Sin[e + f*x]^3), x] - Simp[(b*(m - 4)*Cos[e + f*x]*(a +
 b*Sin[e + f*x])^(m + 1))/(20*a^2*f*Sin[e + f*x]^4), x]) /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b^2, 0] &&
NeQ[m, 1] && IntegerQ[2*m]

Rule 3055

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e +
 f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dis
t[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b
*c - a*d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - a*b*B + a^2*C) + (m + 1)*(b*
c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && Lt
Q[m, -1] && ((EqQ[a, 0] && IntegerQ[m] &&  !IntegerQ[n]) ||  !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&
  !IntegerQ[m]) || EqQ[a, 0])))

Rule 3001

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\cot ^6(c+d x)}{(a+b \sin (c+d x))^2} \, dx &=-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\int \frac{\csc ^4(c+d x) \left (12 \left (5 a^4-22 a^2 b^2+15 b^4\right )-4 a b \left (10 a^2-3 b^2\right ) \sin (c+d x)-4 \left (10 a^4-45 a^2 b^2+36 b^4\right ) \sin ^2(c+d x)\right )}{(a+b \sin (c+d x))^2} \, dx}{120 a^2 b^2}\\ &=-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\int \frac{\csc ^4(c+d x) \left (12 \left (15 a^6-97 a^4 b^2+142 a^2 b^4-60 b^6\right )-12 a b \left (5 a^4-8 a^2 b^2+3 b^4\right ) \sin (c+d x)-60 \left (2 a^6-14 a^4 b^2+21 a^2 b^4-9 b^6\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{120 a^3 b^2 \left (a^2-b^2\right )}\\ &=-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\int \frac{\csc ^3(c+d x) \left (-180 b \left (4 a^6-21 a^4 b^2+29 a^2 b^4-12 b^6\right )+12 a b^2 \left (16 a^4-31 a^2 b^2+15 b^4\right ) \sin (c+d x)+24 b \left (15 a^6-97 a^4 b^2+142 a^2 b^4-60 b^6\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{360 a^4 b^2 \left (a^2-b^2\right )}\\ &=\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\int \frac{\csc ^2(c+d x) \left (48 b^2 \left (38 a^6-173 a^4 b^2+225 a^2 b^4-90 b^6\right )-12 a b^3 \left (73 a^4-133 a^2 b^2+60 b^4\right ) \sin (c+d x)-180 b^2 \left (4 a^6-21 a^4 b^2+29 a^2 b^4-12 b^6\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{720 a^5 b^2 \left (a^2-b^2\right )}\\ &=-\frac{\left (38 a^4-135 a^2 b^2+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\int \frac{\csc (c+d x) \left (-180 b^3 \left (15 a^6-55 a^4 b^2+64 a^2 b^4-24 b^6\right )-180 a b^2 \left (4 a^6-21 a^4 b^2+29 a^2 b^4-12 b^6\right ) \sin (c+d x)\right )}{a+b \sin (c+d x)} \, dx}{720 a^6 b^2 \left (a^2-b^2\right )}\\ &=-\frac{\left (38 a^4-135 a^2 b^2+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}-\frac{\left (\left (a^2-6 b^2\right ) \left (a^2-b^2\right )^2\right ) \int \frac{1}{a+b \sin (c+d x)} \, dx}{a^7}-\frac{\left (b \left (15 a^6-55 a^4 b^2+64 a^2 b^4-24 b^6\right )\right ) \int \csc (c+d x) \, dx}{4 a^7 \left (a^2-b^2\right )}\\ &=\frac{b \left (15 a^4-40 a^2 b^2+24 b^4\right ) \tanh ^{-1}(\cos (c+d x))}{4 a^7 d}-\frac{\left (38 a^4-135 a^2 b^2+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}-\frac{\left (2 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^7 d}\\ &=\frac{b \left (15 a^4-40 a^2 b^2+24 b^4\right ) \tanh ^{-1}(\cos (c+d x))}{4 a^7 d}-\frac{\left (38 a^4-135 a^2 b^2+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}+\frac{\left (4 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^2\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^7 d}\\ &=-\frac{2 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{b+a \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{a^7 d}+\frac{b \left (15 a^4-40 a^2 b^2+24 b^4\right ) \tanh ^{-1}(\cos (c+d x))}{4 a^7 d}-\frac{\left (38 a^4-135 a^2 b^2+90 b^4\right ) \cot (c+d x)}{15 a^6 d}+\frac{\left (4 a^4-17 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{4 a^5 b d}-\frac{\left (15 a^4-82 a^2 b^2+60 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{30 a^4 b^2 d}-\frac{\cot (c+d x) \csc (c+d x)}{2 b d (a+b \sin (c+d x))}+\frac{a \cot (c+d x) \csc ^2(c+d x)}{6 b^2 d (a+b \sin (c+d x))}+\frac{\left (2 a^4-12 a^2 b^2+9 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{6 a^3 b^2 d (a+b \sin (c+d x))}+\frac{3 b \cot (c+d x) \csc ^3(c+d x)}{10 a^2 d (a+b \sin (c+d x))}-\frac{\cot (c+d x) \csc ^4(c+d x)}{5 a d (a+b \sin (c+d x))}\\ \end{align*}

Mathematica [A]  time = 1.56744, size = 361, normalized size = 0.85 \[ -\frac{1920 \left (a^2-6 b^2\right ) \left (a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )+240 b \left (-40 a^2 b^2+15 a^4+24 b^4\right ) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )-240 b \left (-40 a^2 b^2+15 a^4+24 b^4\right ) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )+\frac{2 a \cot (c+d x) \csc ^5(c+d x) \left (-3060 a^2 b^3 \sin (c+d x)+1470 a^2 b^3 \sin (3 (c+d x))-270 a^2 b^3 \sin (5 (c+d x))-12 \left (-85 a^3 b^2+16 a^5+60 a b^4\right ) \cos (2 (c+d x))+\left (-285 a^3 b^2+92 a^5+180 a b^4\right ) \cos (4 (c+d x))-735 a^3 b^2+1162 a^4 b \sin (c+d x)-562 a^4 b \sin (3 (c+d x))+76 a^4 b \sin (5 (c+d x))+196 a^5+540 a b^4+1800 b^5 \sin (c+d x)-900 b^5 \sin (3 (c+d x))+180 b^5 \sin (5 (c+d x))\right )}{a \csc (c+d x)+b}}{960 a^7 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^6/(a + b*Sin[c + d*x])^2,x]

[Out]

-(1920*(a^2 - 6*b^2)*(a^2 - b^2)^(3/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]] - 240*b*(15*a^4 - 40*a
^2*b^2 + 24*b^4)*Log[Cos[(c + d*x)/2]] + 240*b*(15*a^4 - 40*a^2*b^2 + 24*b^4)*Log[Sin[(c + d*x)/2]] + (2*a*Cot
[c + d*x]*Csc[c + d*x]^5*(196*a^5 - 735*a^3*b^2 + 540*a*b^4 - 12*(16*a^5 - 85*a^3*b^2 + 60*a*b^4)*Cos[2*(c + d
*x)] + (92*a^5 - 285*a^3*b^2 + 180*a*b^4)*Cos[4*(c + d*x)] + 1162*a^4*b*Sin[c + d*x] - 3060*a^2*b^3*Sin[c + d*
x] + 1800*b^5*Sin[c + d*x] - 562*a^4*b*Sin[3*(c + d*x)] + 1470*a^2*b^3*Sin[3*(c + d*x)] - 900*b^5*Sin[3*(c + d
*x)] + 76*a^4*b*Sin[5*(c + d*x)] - 270*a^2*b^3*Sin[5*(c + d*x)] + 180*b^5*Sin[5*(c + d*x)]))/(b + a*Csc[c + d*
x]))/(960*a^7*d)

________________________________________________________________________________________

Maple [B]  time = 0.19, size = 897, normalized size = 2.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^6*csc(d*x+c)^6/(a+b*sin(d*x+c))^2,x)

[Out]

1/2/d/a^3*tan(1/2*d*x+1/2*c)^2*b-27/8/d/a^4*b^2*tan(1/2*d*x+1/2*c)+4/d*b^3/a^4/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1
/2*d*x+1/2*c)*b+a)+27/8/d/a^4/tan(1/2*d*x+1/2*c)*b^2-1/2/d/a^3*b/tan(1/2*d*x+1/2*c)^2+10/d/a^5*b^3*ln(tan(1/2*
d*x+1/2*c))+11/16/d/a^2*tan(1/2*d*x+1/2*c)-1/32/d/a^3*tan(1/2*d*x+1/2*c)^4*b+1/8/d/a^4*tan(1/2*d*x+1/2*c)^3*b^
2-1/8/d/a^4/tan(1/2*d*x+1/2*c)^3*b^2-5/2/d/a^6/tan(1/2*d*x+1/2*c)*b^4+1/32/d/a^3*b/tan(1/2*d*x+1/2*c)^4+1/2/d*
b^3/a^5/tan(1/2*d*x+1/2*c)^2-6/d/a^7*b^5*ln(tan(1/2*d*x+1/2*c))-1/2/d/a^5*tan(1/2*d*x+1/2*c)^2*b^3+5/2/d/a^6*b
^4*tan(1/2*d*x+1/2*c)-2/d/a^6/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)*b^5-7/96/d/a^2*tan(1/2*d*x+1/2
*c)^3+7/96/d/a^2/tan(1/2*d*x+1/2*c)^3-2/d/a^3*b^2/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)*tan(1/2*d*
x+1/2*c)+1/160/d/a^2*tan(1/2*d*x+1/2*c)^5-1/160/d/a^2/tan(1/2*d*x+1/2*c)^5-11/16/d/a^2/tan(1/2*d*x+1/2*c)-15/4
/d/a^3*b*ln(tan(1/2*d*x+1/2*c))-2/d/a^7/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)*tan(1/2*d*x+1/2*c)*b
^6+12/d/a^7/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))*b^6-2/d/a^2*b/(tan(1/2*d*
x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)-2/d/a/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)
^(1/2))+4/d*b^4/a^5/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)*tan(1/2*d*x+1/2*c)+16/d/a^3/(a^2-b^2)^(1
/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))*b^2-26/d*b^4/a^5/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*
tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6/(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 5.22019, size = 4674, normalized size = 11.02 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6/(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

[1/120*(2*(92*a^6 - 285*a^4*b^2 + 180*a^2*b^4)*cos(d*x + c)^5 - 40*(7*a^6 - 27*a^4*b^2 + 18*a^2*b^4)*cos(d*x +
 c)^3 + 60*((a^4*b - 7*a^2*b^3 + 6*b^5)*cos(d*x + c)^6 - a^4*b + 7*a^2*b^3 - 6*b^5 - 3*(a^4*b - 7*a^2*b^3 + 6*
b^5)*cos(d*x + c)^4 + 3*(a^4*b - 7*a^2*b^3 + 6*b^5)*cos(d*x + c)^2 - (a^5 - 7*a^3*b^2 + 6*a*b^4 + (a^5 - 7*a^3
*b^2 + 6*a*b^4)*cos(d*x + c)^4 - 2*(a^5 - 7*a^3*b^2 + 6*a*b^4)*cos(d*x + c)^2)*sin(d*x + c))*sqrt(-a^2 + b^2)*
log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*
x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)) + 30*(4*a^6 - 17*a^4*b^2 + 12
*a^2*b^4)*cos(d*x + c) + 15*((15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^6 - 15*a^4*b^2 + 40*a^2*b^4 - 24*
b^6 - 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^4 + 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^
2 - (15*a^5*b - 40*a^3*b^3 + 24*a*b^5 + (15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^4 - 2*(15*a^5*b - 40*a
^3*b^3 + 24*a*b^5)*cos(d*x + c)^2)*sin(d*x + c))*log(1/2*cos(d*x + c) + 1/2) - 15*((15*a^4*b^2 - 40*a^2*b^4 +
24*b^6)*cos(d*x + c)^6 - 15*a^4*b^2 + 40*a^2*b^4 - 24*b^6 - 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^
4 + 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^2 - (15*a^5*b - 40*a^3*b^3 + 24*a*b^5 + (15*a^5*b - 40*a
^3*b^3 + 24*a*b^5)*cos(d*x + c)^4 - 2*(15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^2)*sin(d*x + c))*log(-1/
2*cos(d*x + c) + 1/2) + 2*(4*(38*a^5*b - 135*a^3*b^3 + 90*a*b^5)*cos(d*x + c)^5 - 5*(79*a^5*b - 228*a^3*b^3 +
144*a*b^5)*cos(d*x + c)^3 + 15*(15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c))*sin(d*x + c))/(a^7*b*d*cos(d*x
 + c)^6 - 3*a^7*b*d*cos(d*x + c)^4 + 3*a^7*b*d*cos(d*x + c)^2 - a^7*b*d - (a^8*d*cos(d*x + c)^4 - 2*a^8*d*cos(
d*x + c)^2 + a^8*d)*sin(d*x + c)), 1/120*(2*(92*a^6 - 285*a^4*b^2 + 180*a^2*b^4)*cos(d*x + c)^5 - 40*(7*a^6 -
27*a^4*b^2 + 18*a^2*b^4)*cos(d*x + c)^3 + 120*((a^4*b - 7*a^2*b^3 + 6*b^5)*cos(d*x + c)^6 - a^4*b + 7*a^2*b^3
- 6*b^5 - 3*(a^4*b - 7*a^2*b^3 + 6*b^5)*cos(d*x + c)^4 + 3*(a^4*b - 7*a^2*b^3 + 6*b^5)*cos(d*x + c)^2 - (a^5 -
 7*a^3*b^2 + 6*a*b^4 + (a^5 - 7*a^3*b^2 + 6*a*b^4)*cos(d*x + c)^4 - 2*(a^5 - 7*a^3*b^2 + 6*a*b^4)*cos(d*x + c)
^2)*sin(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c))) + 30*(4*a^6 - 1
7*a^4*b^2 + 12*a^2*b^4)*cos(d*x + c) + 15*((15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^6 - 15*a^4*b^2 + 40
*a^2*b^4 - 24*b^6 - 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^4 + 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)
*cos(d*x + c)^2 - (15*a^5*b - 40*a^3*b^3 + 24*a*b^5 + (15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^4 - 2*(1
5*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^2)*sin(d*x + c))*log(1/2*cos(d*x + c) + 1/2) - 15*((15*a^4*b^2 -
 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^6 - 15*a^4*b^2 + 40*a^2*b^4 - 24*b^6 - 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)
*cos(d*x + c)^4 + 3*(15*a^4*b^2 - 40*a^2*b^4 + 24*b^6)*cos(d*x + c)^2 - (15*a^5*b - 40*a^3*b^3 + 24*a*b^5 + (1
5*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^4 - 2*(15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c)^2)*sin(d*x
 + c))*log(-1/2*cos(d*x + c) + 1/2) + 2*(4*(38*a^5*b - 135*a^3*b^3 + 90*a*b^5)*cos(d*x + c)^5 - 5*(79*a^5*b -
228*a^3*b^3 + 144*a*b^5)*cos(d*x + c)^3 + 15*(15*a^5*b - 40*a^3*b^3 + 24*a*b^5)*cos(d*x + c))*sin(d*x + c))/(a
^7*b*d*cos(d*x + c)^6 - 3*a^7*b*d*cos(d*x + c)^4 + 3*a^7*b*d*cos(d*x + c)^2 - a^7*b*d - (a^8*d*cos(d*x + c)^4
- 2*a^8*d*cos(d*x + c)^2 + a^8*d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**6/(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.24538, size = 805, normalized size = 1.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6/(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/480*(120*(15*a^4*b - 40*a^2*b^3 + 24*b^5)*log(abs(tan(1/2*d*x + 1/2*c)))/a^7 + 960*(a^6 - 8*a^4*b^2 + 13*a^
2*b^4 - 6*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2 - b^2))
)/(sqrt(a^2 - b^2)*a^7) + 960*(a^4*b^2*tan(1/2*d*x + 1/2*c) - 2*a^2*b^4*tan(1/2*d*x + 1/2*c) + b^6*tan(1/2*d*x
 + 1/2*c) + a^5*b - 2*a^3*b^3 + a*b^5)/((a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c) + a)*a^7) - (3*a^
8*tan(1/2*d*x + 1/2*c)^5 - 15*a^7*b*tan(1/2*d*x + 1/2*c)^4 - 35*a^8*tan(1/2*d*x + 1/2*c)^3 + 60*a^6*b^2*tan(1/
2*d*x + 1/2*c)^3 + 240*a^7*b*tan(1/2*d*x + 1/2*c)^2 - 240*a^5*b^3*tan(1/2*d*x + 1/2*c)^2 + 330*a^8*tan(1/2*d*x
 + 1/2*c) - 1620*a^6*b^2*tan(1/2*d*x + 1/2*c) + 1200*a^4*b^4*tan(1/2*d*x + 1/2*c))/a^10 - (4110*a^4*b*tan(1/2*
d*x + 1/2*c)^5 - 10960*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 + 6576*b^5*tan(1/2*d*x + 1/2*c)^5 - 330*a^5*tan(1/2*d*x
+ 1/2*c)^4 + 1620*a^3*b^2*tan(1/2*d*x + 1/2*c)^4 - 1200*a*b^4*tan(1/2*d*x + 1/2*c)^4 - 240*a^4*b*tan(1/2*d*x +
 1/2*c)^3 + 240*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 + 35*a^5*tan(1/2*d*x + 1/2*c)^2 - 60*a^3*b^2*tan(1/2*d*x + 1/2*
c)^2 + 15*a^4*b*tan(1/2*d*x + 1/2*c) - 3*a^5)/(a^7*tan(1/2*d*x + 1/2*c)^5))/d